<%@ page language="java" contentType="text/html; charset=EUC-KR"
	pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Items Management Page</title>
<!-- IMPORT CSS       -->
<link rel="stylesheet" type="text/css" href="default.css" />

<style type="text/css">
/* YOU CAN ADD EVERY CSS STYLES HERE !!!! 
            * I WILL WRAP ALL THIS UP TO ONE CSS FILE LATER
            */
#listbox {
	border-style: none;
	width: 300px;
	height: 200px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

#listbox1 {
	border-style: none;
	width: 300px;
	height: 200px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

#addEmployeeButton {
	position: relative;
	right: 130px;
	font-size: 12pt;
	width: 200px;
}

#transactionBtn1 {
	position: relative;
	width: 150px;
	font-size: 12pt;
	left: 120px;
	bottom: 170px
}

#revenueBtn1 {
	position: relative;
	width: 150px;
	font-size: 12pt;
	left: 120px;
	bottom: 100px
}

#activeitembtn {
	position: relative;
	font-size: 12pt;
	bottom: 230px;
}

#customerslistbtn {
	position: relative;
	font-size: 12pt;
	bottom: 220px;
}

#itembycompanybtn{
	position: relative;
	font-size: 12pt;
	bottom: 200px;
}

#transactionBtn2 {
	position: relative;
	width: 150px;
	font-size: 12pt;
	left: 150px;
	bottom: 180px
}

#revenueBtn2 {
	position: relative;
	width: 150px;
	font-size: 12pt;
	left: 150px;
	bottom: 100px
}

#bestitembox {
	position: relative;
	border-style: ridge;
	margin-left: auto;
	margin-right: auto;
	width: 420px;
	height: 50px;
	bottom: 20px;
	font-size: 12pt;
	text-align: center;
}

#listfield {
	position: relative;
	right: 80px;
}

#listfield1 {
	position: relative;
	bottom:130px;
	right: 80px;
}

#typelistbox {
	border-style: none;
	width: 300px;
	height: 300px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

#typelistfield {
	position: relative;
	right: 80px;
}

#hrline {
	width: 480px;
	margin-left: auto;
	margin-right: auto;}
#revenue1{position:relative; margin-left:auto; margin-right:auto;bottom:200px}
#transactionitem{position:relative; margin-left:auto; margin-right:auto;bottom:600px}
</style>

<script language="javascript" type="text/javascript">
	// <!CDATA[
	function Button0_onclick() {
		if (document.saleReportForm.year.value == ""
				|| document.saleReportForm.month.value == "") {
			alert("You must select item");
		}

		else {
			document.saleReportForm.submit();
		}
	}

	function Button1_onclick() {
		if (document.itemselectedform.itemlist = "") {
			alert("You must select item");
		}

		else {
//			document.itemselectedform.submit();
//			window.open("itemtransaction.jsp", "_blank");
		}

	}

	function Button2_onclick() {
		if (document.revenuebyitem.itemlist = "") {
			alert("You must select item");
		}

		else {
//			document.revenuebyitem.submit();
//			window.open("revenuesbyitem.jsp");
		}
	}
	function Button3_onclick() {
		if (document.itemselectedform.itemlist = "") {
			alert("You must select item");
		}

		else {
			document.itemselectedform.submit();
			window.open("activeitemlist.jsp", "_blank");
		}
	}

	function Button4_onclick() {
		if (document.itemselectedform.itemlist = "") {
			alert("You must select item");
		}

		else {
//			document.itemselectedform.submit();
//			window.open("customspurchitem.jsp", "_blank");
		}
	}

	function Button5_onclick() {
		if (document.itemtypeform.itemlist = "") {
			alert("You must select item");
		}

		else {
//			document.itemtypeform.submit();
//			window.open("itemtypetransaction.jsp", "_blank");
		}
	}

	function Button6_onclick() {
		if (document.itemtypeform.itemlist = "") {
			alert("You must select item");
		}

		else {
//			document.itemtypeform.submit();
//			window.open("itemtyperevenues.jsp", "_blank");
		}
	}

	function Button7_onclick() {
		if (document.itemselectedform.companyname = "") {
			alert("You must select item");
		}

		else {
			document.itemselectedform.submit();
			window.open("itemcompanylist.jsp", "_blank");
		}
	}

	//
</script>

</head>
<body>
	<div id="wrapper">
		<div id="header">
			<%@include file="managerheader.html"%>
		</div>
		<div id="container">
			<div class="content min-width min-height">
				<!-- Sales Report form -->
				<div id="salereport">
					<form name="saleReportForm" method="post"
						action="salereportbymonth.jsp">

						<span>Year:</span> <input type="text" name="year"
							style="width: 50px;"> &nbsp;<span>Month:</span> <input
							type="text" name="month" style="width: 50px;"><br /> <input
							type="button"
							value="Obtain Sales Report By The Given Year and Month"
							onclick="Button0_onclick()">
					</form>
				</div>
				<br />

				<!-- Item List Form -->
				<form name="itemselectedform" method="post"	action="itemtransaction.jsp">
					<div id="listbox">
						<fieldset id="listfield">
							<legend style="font-size: 120%">
								<strong>Item List</strong>
							</legend>
							
							<%@include file="itemlist.jsp"%>
						</fieldset>
						<input type="text" name="transac">
					</div>
				
					<!--Transaction Report By Item-->
	
					<div id="transactions1">
					
						<input type="submit" id="transactionBtn1" value="Transactions">
						
						
					</div>
					</form>	
				
				<!-- Revenue Report By Item -->
				<form name = "revenuebyitem" method="post" action = "revenuesbyitem.jsp">
				<input type="text" name="reve">
				
					<div id="listbox1">
						<fieldset id="listfield1">
							<legend style="font-size: 120%">
								<strong>Item List</strong>
							</legend>
							
							<%@include file="itemlist1.jsp"%>
						</fieldset>
					</div>
					<div id="revenue1">
						<input type="submit" id="revenueBtn1" value="Revenue">
						
							
				</div>
				
			</form>
				
				
				<!-- The most active items -->
				<form name="mostactiveitem" method="post"
					action="activeitemlist.jsp">
					<div id="activeitems">
						<input type="button" id="activeitembtn"
							value="The List of The Most Active Items"
							onclick="Button3_onclick()">
					</div>
				</form>

				<form name="cu" method="post" action ="customspurchitem.jsp">
				<!-- List of customers who have purchased the selected item -->
				<div id="customerbuy">
					<input type="text" name="custo">
					<input type="submit" id="customerslistbtn"
						value="Customers Who Have Purchased The Selected Item"
						onclick="Button4_onclick()">
				</div>
				</form>
				<div>
				
				</div>
				
				<br />
				<!-- List of All items produced by a given company -->
				<form name="itemofcompany" method="post"
					action="itemcompanylist.jsp">
					<div id="itembycompanybtn">
						<input type="text" name="companyname"> <input
							type="button"
							value="Obtain The List Of All Items of The Given Company"
							onclick="Button7_onclick()">
						</div>	
				</form>
			</div>




			<br />
			<div id="hrline">
				<hr />
			</div>
			<!-- Item Type Form -->

				<div id="typelistbox">
					<fieldset id="typelistfield">
						<legend style="font-size: 120%">
							<strong>Item Type List</strong>
						</legend>
						<%@include file="itemtypelist.jsp"%>
					</fieldset>
				</div>
				<!--Go to Transaction Report Page -->
				<div id="transactions2">
				
					<input type="submit" id="transactionBtn2" value="Transactions"
						onclick="Button5_onclick()">
				</div>

				<!-- Go to Revenue Management Page -->
				<form name="form" method="post" action="revenuesbycustomer.jsp">
				<div id="revenue2">
				<input type="text" name="tr">
					<input type="submit" id="revenueBtn2" value="Revenues"
						onclick="Button6_onclick()">
				</div>
			</form>
			<br />
			<div id="bestitembox">
				<fieldset id="bestitemfield">
					<legend>The Best Item generating the most total revenue</legend>
					<p>Item 2</p>
				</fieldset>
			</div>
		</div>
	</div>
	</div>
	<div id="footer">
		<%@include file="footer.html"%>
	</div>

</body>
</html>
